<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="include/header.jsp"%>
<script type="text/javascript" src="${path}/script/order.js"></script>
<div data-options="region:'center'",style="width:85%;">
        <table id="dg"
            title="订单信息"
            class="easyui-datagrid"
            style="width:100%;height:100%;"
            url="/Lease/order.json"
            toolbar="#toolbar"
            pagination="true"
            fitColumns="true"
            idField="id"
            singleSelect="true">
                    <thead>
                    <tr>
                        <th field="id" width="5%">ID</th>
                        <th field="customerName" width="10%">客户姓名</th>
                        <th field="deposit" width="10%">押金</th>
                        <th field="advance" width="10%">预付款</th>
                        <th field="price" width="10%">应付款</th>
                        <th field="paid" width="10%">实付款</th>
                        <th field="discount" width="10%">优惠</th>
                        <th field="arrears" width="10%">欠款</th>
                        <th field="remark" width="25%">备注</th>
                    </tr>
                    </thead>
                </table>
        <div id="toolbar">
            <span>客户姓名</span>
            <input id="customerNmae" style="line-height:23px;border:1px solid #ccc">
            <a href="#" class="easyui-linkbutton" plain="true" onclick="doSearch()">查询</a>
            <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newOrder()">添加</a>
             <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true"onclick="editOrder()">修改</a>
        </div>
        <div id="dlg" class="easyui-dialog" style="width:400px;height:280px;padding:10px 20px"
                     closed="true" buttons="#dlg-buttons">
            <div class="ftitle">订单信息</div>
            <form id="fm" method="post" novalidate>
                <div class="fitem">
                    <label>客户姓名</label>
                    <input name="cusId" id="customerName" required="true">
                </div>
                <div class="fitem">
                    <label>押金</label>
                    <input type="text" name="deposit" class="easyui-numberbox" data-options="min:0,precision:2">
                </div>
                <div class="fitem">
                    <label>预付款</label>
                    <input type="text" name="advance" class="easyui-numberbox" data-options="min:0,precision:2">
                </div>
                <div class="fitem">
                    <label>备注</label>
                    <input name="remark" class="easyui-textbox">
                </div>
            </form>
        </div>
        <div id="dlg-buttons">
            <a href="javascript:void(0)" class="easyui-linkbutton c6" iconCls="icon-ok" onclick="saveOrder()"
               style="width:90px">保存</a>
            <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel"
               onclick="javascript:$('#dlg').dialog('close')" style="width:90px">退出</a>
        </div>


        <div id="dlg-update" class="easyui-dialog" style="width:400px;height:320px;padding:10px 20px"
                             closed="true" buttons="#dlg-buttons-update">
                    <div class="ftitle">订单信息</div>
                    <form id="fm-update" method="post" novalidate>
                        <div class="fitem">
                            <label>客户姓名</label>
                            <input name="customerNmae" class="easyui-textbox" readonly>
                        </div>
                        <div class="fitem">
                            <label>押金</label>
                            <input type="text" name="deposit" class="easyui-numberbox" data-options="min:0,precision:2" readonly>
                        </div>
                        <div class="fitem">
                            <label>预付款</label>
                            <input type="text" name="advance" class="easyui-numberbox" data-options="min:0,precision:2" readonly>
                        </div>
                        <div class="fitem">
                            <label>优惠</label>
                            <input type="text" name="discount" class="easyui-numberbox" data-options="min:0,precision:2">
                        </div>
                        <div class="fitem">
                            <label>实收款</label>
                            <input type="text" name="paid" class="easyui-numberbox" data-options="min:0,precision:2">
                        </div>
                        <div class="fitem">
                            <label>备注</label>
                            <input name="remark" class="easyui-textbox">
                        </div>
                    </form>
                </div>
                <div id="dlg-buttons-update">
                    <a href="javascript:void(0)" class="easyui-linkbutton c6" iconCls="icon-ok" onclick="updateOrder()"
                       style="width:90px">保存</a>
                    <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel"
                       onclick="javascript:$('#dlg-update').dialog('close')" style="width:90px">退出</a>
                </div>

        <style type="text/css">
            #fm{
            margin:0;
            padding:10px 30px;
            }
            .ftitle{
            font-size:14px;
            font-weight:bold;
            padding:5px 0;
            margin-bottom:10px;
            border-bottom:1px solid #ccc;
            }
            .fitem{
            margin-bottom:5px;
            }
            .fitem label{
            display:inline-block;
            width:80px;
            }
            .fitem input{
            width:160px;
            }
        </style>
    </div>
<%@ include file="include/footer.jsp"%>
